package com.nbst.controller.url;

import javax.servlet.http.HttpSession;

import com.nbst.comnutil.WeekUtil;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

//import com.nb.st.CopyRight;
import com.nbst.model.base.User;
import com.nbst.service.base.IDataBaseService;

import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 *
 * @ClassName: MainController
 * @Description:
 * @author King
 * @date 2018-8-29
 *
 */
@Controller
public class MainController {

	@Autowired
	IDataBaseService dataBaseService;

	@RequestMapping(value = "/logout")
	public String logout() {
		Subject subject = SecurityUtils.getSubject();
		Session session = subject.getSession();
		// 销毁session
		session.stop();
		return "logout";
	}

	/**
	 * 未授权页面
	 *
	 * @param session
	 * @return String
	 * @author King
	 * @date 2018-8-31
	 */
	@RequestMapping(value = "/noAuth")
	public String noAuth(HttpSession session) {
		return "noAuth";
	}

	@RequestMapping(value = "/")
	public String index(HttpSession session) {
		return "index";
	}

	@RequestMapping(value = "/toLogin")
	public String toLogin(HttpSession session) {
		return "index";
	}

	@RequestMapping(value = "/index")
	public String index2(HttpSession session) {
		return "index";
	}

	/* 办公室部分 start */
	/**
	 * 页面框架
	 *
	 * @param session
	 * @return
	 */
	@RequestMapping(value = "/in")
	public String home(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user == null) {
			return "index";
		}
		return "index_sy";
	}

	/**
	 * 首页
	 *
	 * @param session
	 * @return
	 */
	@RequestMapping(value = "/home")
	public String mes(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user == null) {
			return "index";
		}
		return "home/home";
	}

	/* 基础信息部分 start */
	/**
	 * 用户管理页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/U")
	public String user(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "BasicInfo/user";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "BasicInfo/user";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 角色管理页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/R")
	public String role(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "BasicInfo/role";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "BasicInfo/role";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 人员信息管理页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PI")
	public String personInfo(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "BasicInfo/personInfo";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "BasicInfo/personInfo";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 人员考勤管理页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/CWA")
	public String checkWorkAttendance(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "BasicInfo/checkWorkAttendance";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "BasicInfo/checkWorkAttendance";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 工作中心页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/WC")
	public String workCenter(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "BasicInfo/workCenter";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "BasicInfo/workCenter";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 物料替代页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/MRE")
	public String materielReplace(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "BasicInfo/materielReplace";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "BasicInfo/materielReplace";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 检验项目模板页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/CK")
	public String checking(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "BasicInfo/checking";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "BasicInfo/checking";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 设备关联员工页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/DAE")
	public String deviceAssociatedEmployees(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "BasicInfo/deviceAssociatedEmployees";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "BasicInfo/deviceAssociatedEmployees";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 重置设备页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/RD")
	public String resetDevice(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "BasicInfo/resetDevice";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "BasicInfo/resetDevice";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 设置设备开工次数
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "SET_MAC_TIMES")
	public String getSetMachineTimes(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "BasicInfo/setMachineTimes";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "BasicInfo/setMachineTimes";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 物料代码修改页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/MAM")
	public String materialModify(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "BasicInfo/materialModify";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "BasicInfo/materialModify";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 员工信息页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/SI")
	public String staffInfo(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "BasicInfo/staffInfo";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "BasicInfo/staffInfo";
		}
		return "errorTip/loginsx";
	}

	/**
	 * WMS日志页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/WMSLOG")
	public String wmslog(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "BasicInfo/wmslog";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "BasicInfo/wmslog";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 装配自动派工配置页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/ZAPD")
	public String autoPieDefine(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "BasicInfo/autoPieDefine";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "BasicInfo/autoPieDefine";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 供应商信息页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/SPI")
	public String supplierInfo(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "BasicInfo/supplierInfo";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "BasicInfo/supplierInfo";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 客户信息页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/CUSTOMER_INFO")
	public String customerInfo(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "BasicInfo/customerInfo";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "BasicInfo/customerInfo";
		}
		return "errorTip/loginsx";
	}


	/**
	 * 录入项目计划
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/INPUT_PLAN")
	public String inputPlan(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "technology/processI";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "technology/processI";
		}
		return "errorTip/loginsx";
	}
	/**
	 * 工时周报表
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/WEEK_TABLE")
	public String weekTable(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "technology/weekTable";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "technology/weekTable";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 项目工时统计和对比报表
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/COMPARE_WEEK_TABLE")
	public String compareWeekTable(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "technology/compareWeekTable";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "technology/compareWeekTable";
		}
		return "errorTip/loginsx";
	}
	/**
	 * 某项目某周工时计划和执行周报表
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/REAL_TABLE")
	public String realTable(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "technology/realTable";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "technology/realTable";
		}
		return "errorTip/loginsx";
	}
	/**
	 * 操作日志页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/OP_LG")
	public String operateLog(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "BasicInfo/operateLog";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "BasicInfo/operateLog";
		}
		return "errorTip/loginsx";
	}
	/* 基础信息部分 end */

	/* 工艺管理部分 start */
	/**
	 * 工序查看页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/P")
	public String process(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "technology/realTable";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "technology/realTable";
		}
		return "errorTip/loginsx";
	}

	/* 工艺管理部分 start */
	/**
	 * 工序查看页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/E")
	public String processE(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "technology/processE";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "technology/processE";
		}
		return "errorTip/loginsx";
	}

	@RequestMapping(value = "/PZ")
	public String processPZ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "technology/compareWeekTable";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "technology/compareWeekTable";
		}
		return "errorTip/loginsx";
	}

	@RequestMapping(value = "/EZ")
	public String processEZ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "technology/weekTable";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "technology/weekTable";
		}
		return "errorTip/loginsx";
	}

	/* 工艺管理部分 start */
	/**
	 * 工序查看页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/EP")
	public String processEP(Model model, HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		Calendar cal= Calendar.getInstance();
		//model.addAttribute("cal",cal);
		session.setAttribute("cal",cal);
		Map<String,Object> dateinfo=new HashMap<>();
		dateinfo.put("year",WeekUtil.yearNoCount((Calendar) cal.clone()));
		dateinfo.put("month", WeekUtil.monthNoCount((Calendar) cal.clone()));
		dateinfo.put("week",WeekUtil.weekNoCount((Calendar) cal.clone()));
//		model.addAttribute("year",WeekUtil.yearNoCount((Calendar) cal.clone()));
//		model.addAttribute("month", WeekUtil.monthNoCount((Calendar) cal.clone()));
//		model.addAttribute("week",WeekUtil.weekNoCount((Calendar) cal.clone()));
		model.addAttribute("name",user.getName());
		cal=WeekUtil.getFirstDay((Calendar) cal.clone());
		for(int i=0;i<7;i++){
			//model.addAttribute("day"+i,cal.get(Calendar.YEAR)+"."+(cal.get(Calendar.MONTH)+1)+"."+cal.get(Calendar.DATE));
			dateinfo.put("day"+i,cal.get(Calendar.YEAR)+"."+(cal.get(Calendar.MONTH)+1)+"."+cal.get(Calendar.DATE));
			cal.add(Calendar.DATE,1);
		}
		model.addAttribute("dateinfo",dateinfo);
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "technology/processEP";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "technology/processEP";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 工艺线路维护页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PR")
	public String processRoute(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "technology/processRoute";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "technology/processRoute";
		}
		return "errorTip/loginsx";
	}

	/**
	 * BOM管理页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/BOM")
	public String bom(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "technology/bom";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "technology/bom";
		}
		return "errorTip/loginsx";
	}
	/* 工艺管理部分 end */

	/* 图文档部分 start */
	/**
	 * 图文档管理页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/DW")
	public String drawingManagement(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Drawing/drawingManagement";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Drawing/drawingManagement";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 图文档台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/DL")
	public String drawingLedger(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Drawing/drawingLedger";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Drawing/drawingLedger";
		}
		return "errorTip/loginsx";
	}
	/* 图文档部分 end */

	/* 生产调度部分 start */
	/**
	 * 新增生产任务页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/APT")
	public String addProductionTask(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Production/addProductionTask";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Production/addProductionTask";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 生产任务页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PT")
	public String productionTask(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Production/productionTask";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Production/productionTask";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 派工中心页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PIES")
	public String pies(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Production/pies";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Production/pies";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 工序计划页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PP")
	public String processPlan(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Production/processPlan";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Production/processPlan";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 装配派工中心页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PIESZP")
	public String piesZP(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Production/piesZP";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Production/piesZP";
		}
		return "errorTip/loginsx";
	}
	
	/**
	 * 报工单打印页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/WR")
	public ModelAndView workReport(HttpSession session, ModelAndView mav, String endId) {
//		session.setAttribute("copy", CopyRight.copyRight);
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			mav = new ModelAndView("print/workReport");
			mav.addObject("endId", endId);
		} else {
			mav = new ModelAndView("errorTip/loginsx");
		}
		return mav;
	}

	/**
	 * 派工单打印页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/DS")
	public ModelAndView dispatchSheet(HttpSession session, ModelAndView mav, String data, String fDisId, Integer type,
			String fCardId) {
//		session.setAttribute("copy", CopyRight.copyRight);
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			mav = new ModelAndView("print/dispatchSheet");
			mav.addObject("data", data);
			mav.addObject("fDisId", fDisId);
			mav.addObject("type", type);
			mav.addObject("fCardId", fCardId);
		} else {
			mav = new ModelAndView("errorTip/loginsx");
		}
		return mav;
	}

	/**
	 * 派工单打印页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/DSY")
	public ModelAndView dispatchSheetyou(HttpSession session, ModelAndView mav, String data, String fDisId,
			Integer type, String fCardId) {
//		session.setAttribute("copy", CopyRight.copyRight);
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			mav = new ModelAndView("print/dispatchSheetyou");
			mav.addObject("data", data);
			mav.addObject("fDisId", fDisId);
			mav.addObject("type", type);
			mav.addObject("fCardId", fCardId);
		} else {
			mav = new ModelAndView("errorTip/loginsx");
		}
		return mav;
	}

	/**
	 * 派工单打印页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/DSS")
	public ModelAndView dispatchSheetBatch(HttpSession session, ModelAndView mav, String data, Integer type,
			String fDisIds, String fDisnames) {
//		session.setAttribute("copy", CopyRight.copyRight);
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			mav = new ModelAndView("print/dispatchSheetBatch");
			mav.addObject("fDisIds", fDisIds);
			mav.addObject("fDisnames", fDisnames);
		} else {
			mav = new ModelAndView("errorTip/loginsx");
		}
		return mav;
	}

	/**
	 * 委外单打印页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/OL")
	public ModelAndView outsourcingList(HttpSession session, ModelAndView mav, Integer id) {
//		session.setAttribute("copy", CopyRight.copyRight);
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			mav = new ModelAndView("print/outsourcingList");
			mav.addObject("id", id);
		} else {
			mav = new ModelAndView("errorTip/loginsx");
		}
		return mav;
	}

	/**
	 * 外购入库检验单打印页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/OSTL")
	public ModelAndView outsourcingTestList(HttpSession session, ModelAndView mav, Integer id) {
//		session.setAttribute("copy", CopyRight.copyRight);
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			mav = new ModelAndView("print/outsourcingTestList");
			mav.addObject("id", id);
		} else {
			mav = new ModelAndView("errorTip/loginsx");
		}
		return mav;
	}

	/**
	 * 委外入库检验单打印页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/OSL")
	public ModelAndView outSourcedList(HttpSession session, ModelAndView mav, String ids) {
//		session.setAttribute("copy", CopyRight.copyRight);
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			mav = new ModelAndView("print/outSourcedList");
			mav.addObject("ids", ids);
		} else {
			mav = new ModelAndView("errorTip/loginsx");
		}
		return mav;
	}

	/**
	 * 入库单打印页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/GE")
	public ModelAndView godownEntry(HttpSession session, ModelAndView mav, Integer id) {
//		session.setAttribute("copy", CopyRight.copyRight);
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			mav = new ModelAndView("print/godownEntry");
			mav.addObject("id", id);
		} else {
			mav = new ModelAndView("errorTip/loginsx");
		}
		return mav;
	}

	/**
	 * 领料单打印页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PO")
	public ModelAndView printOut(HttpSession session, ModelAndView mav, Integer id, String fCode, String fApplyID,
			String fStockID, String fStockName) {
//		session.setAttribute("copy", CopyRight.copyRight);
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			mav = new ModelAndView("print/printOut");
			mav.addObject("id", id);
			mav.addObject("fCode", fCode);
			mav.addObject("fStockID", fStockID);
			mav.addObject("fStockName", fStockName);
			mav.addObject("fApplyID", fApplyID);
		} else {
			mav = new ModelAndView("errorTip/loginsx");
		}
		return mav;
	}

	/**
	 * 实时库存打印页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/POS")
	public ModelAndView inFactWare(HttpSession session, ModelAndView mav, String fName, String fModel, String fBatchNo,
			String fStocker, String fPrintNum, String fItemID, String fStockID, String fStockPlaceID) {
//		session.setAttribute("copy", CopyRight.copyRight);
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			mav = new ModelAndView("print/inFactWare");
			mav.addObject("fName", fName);
			mav.addObject("fModel", fModel);
			mav.addObject("fBatchNo", fBatchNo);
			mav.addObject("fStocker", fStocker);
			mav.addObject("fPrintNum", fPrintNum);
			mav.addObject("fItemID", fItemID);
			mav.addObject("fStockID", fStockID);
			mav.addObject("fStockPlaceID", fStockPlaceID);
		} else {
			mav = new ModelAndView("errorTip/loginsx");
		}
		return mav;
	}

	/**
	 * 库位打印页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/POSS")
	public ModelAndView locationPrint(HttpSession session, ModelAndView mav, String fStockID, String fSPName,
			String fSPID, String fStockName) {
//		session.setAttribute("copy", CopyRight.copyRight);
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			mav = new ModelAndView("print/locationPrint");
			mav.addObject("fStockID", fStockID);
			mav.addObject("fSPName", fSPName);
			mav.addObject("fSPID", fSPID);
			mav.addObject("fStockName", fStockName);
		} else {
			mav = new ModelAndView("errorTip/loginsx");
		}
		return mav;
	}

	/**
	 * 员工二维码打印页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PS")
	public ModelAndView printStaff(HttpSession session, ModelAndView mav, String fNumber) {
//		session.setAttribute("copy", CopyRight.copyRight);
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			mav = new ModelAndView("print/printStaff");
			mav.addObject("fNumber", fNumber);
		} else {
			mav = new ModelAndView("errorTip/loginsx");
		}
		return mav;
	}

	/**
	 * 物料卡（成品）打印页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/MCD")
	public ModelAndView materielCard(HttpSession session, ModelAndView mav, Integer index, Integer type,
			Integer fEntryId, Integer fStockPlaceID, String fBatchNo) {
//		session.setAttribute("copy", CopyRight.copyRight);
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			mav = new ModelAndView("print/materielCard");
			mav.addObject("index", index);
			mav.addObject("type", type);
			mav.addObject("fEntryId", fEntryId);
			mav.addObject("fStockPlaceID", fStockPlaceID);
			mav.addObject("fBatchNo", fBatchNo);
		} else {
			mav = new ModelAndView("errorTip/loginsx");
		}
		return mav;
	}

	/**
	 * 物料卡打印页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/MCDB")
	public ModelAndView materielCardB(HttpSession session, ModelAndView mav, Integer index, Integer type,
			Integer fEntryId) {
//		session.setAttribute("copy", CopyRight.copyRight);
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			mav = new ModelAndView("print/materielCardB");
			mav.addObject("index", index);
			mav.addObject("type", type);
			mav.addObject("fEntryId", fEntryId);
		} else {
			mav = new ModelAndView("errorTip/loginsx");
		}
		return mav;
	}

	/**
	 * 生产任务操作页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PTO")
	public String productionTaskOperation(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Production/productionTaskOperation";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Production/productionTaskOperation";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 子任务操作页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/SPTO")
	public String sonProductionTaskOperation(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Production/sonProductionTaskOperation";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Production/sonProductionTaskOperation";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 子任务跟踪页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/STT")
	public String sonTaskTracking(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Production/sonTaskTracking";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Production/sonTaskTracking";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 生产领料单打印页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/MR")
	public ModelAndView materialRequisition(HttpSession session, ModelAndView mav, String fBillNo, Integer id) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			mav = new ModelAndView("/Production/materialRequisition");
			mav.addObject("fBillNo", fBillNo);
			mav.addObject("id", id);
		} else {
			mav = new ModelAndView("errorTip/loginsx");
		}
		return mav;
	}

	/**
	 * 生产流程卡打印页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PPC")
	public ModelAndView productionProcessCard(HttpSession session, ModelAndView mav, String cardNo) {
//		session.setAttribute("copy", CopyRight.copyRight);
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			mav = new ModelAndView("/Production/productionProcessCard");
			mav.addObject("cardNo", cardNo);
		} else {
			mav = new ModelAndView("errorTip/loginsx");
		}
		return mav;
	}

	/**
	 * 物料卡打印页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/MC")
	public ModelAndView materielCard(HttpSession session, ModelAndView mav, String fInterID, String fEntryID,
			Integer num, String fBillNo) {
//		session.setAttribute("copy", CopyRight.copyRight);
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			mav = new ModelAndView("/Production/materielCard");
			mav.addObject("fInterID", fInterID);
			mav.addObject("fEntryID", fEntryID);
			mav.addObject("num", num);
			mav.addObject("fBillNo", fBillNo);
		} else {
			mav = new ModelAndView("errorTip/loginsx");
		}
		return mav;
	}

	/**
	 * 工装申请页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/TC")
	public String toolingCollar(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Production/toolingCollar";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Production/toolingCollar";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 工装审核页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/TA")
	public String toolingReturn(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Production/toolingAudit";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Production/toolingAudit";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 工装归还页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/TR")
	public String toolingAudit(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Production/toolingReturn";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Production/toolingReturn";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 合并领料页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/MRN")
	public String mergerRequisition(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Production/mergerRequisition";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Production/mergerRequisition";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 生产改制页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PR_RS")
	public String productRestructure(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Production/productRestructure";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Production/productRestructure";
		}
		return "errorTip/loginsx";
	}
	/* 生产调度部分 end */

	/* 报工管理部分 start */
	/**
	 * 开工登记页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/SO")
	public String startOperation(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "jobBooking/startOperation";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "jobBooking/startOperation";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 装配开工登记页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/ZPSO")
	public String startOperationZP(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "jobBooking/startOperationZP";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "jobBooking/startOperationZP";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 装配完工报工页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/ZPFO")
	public String finishOperationZP(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "jobBooking/finishOperationZP";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "jobBooking/finishOperationZP";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 完工报工页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/FO")
	public String finishOperation(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "jobBooking/finishOperation";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "jobBooking/finishOperation";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 试车报工页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/TDR")
	public String testDriveReport(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "jobBooking/testDriveReport";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "jobBooking/testDriveReport";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 首检页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/FQC")
	public String firstQualityChecking(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "jobBooking/firstQualityChecking";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "jobBooking/firstQualityChecking";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 巡检页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/PQC")
	public String patrolQualityChecking(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "jobBooking/patrolQualityChecking";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "jobBooking/patrolQualityChecking";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 抽检页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/TQC")
	public String takeQualityChecking(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "jobBooking/takeQualityChecking";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "jobBooking/takeQualityChecking";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 完工质检页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/FHQC")
	public String finishQualityChecking(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "jobBooking/finishQualityChecking";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "jobBooking/finishQualityChecking";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 外协质检页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/OQC")
	public String outsideQualityChecking(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "jobBooking/outsideQualityChecking";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "jobBooking/outsideQualityChecking";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 质量检验页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/QC")
	public String qualityChecking(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "jobBooking/qualityChecking";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "jobBooking/qualityChecking";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 进料质检页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/JLZJ")
	public String jlqualityChecking(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "jobBooking/jlqualityChecking";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "jobBooking/jlqualityChecking";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 投料计划
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/MFP")
	public String feedingPlan(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Production/feedingPlan";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Production/feedingPlan";
		}
		return "loginsx";
	}

	/**
	 * 预装配缺料
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PQL")
	public String planql(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Production/planql";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Production/planql";
		}
		return "loginsx";
	}

	/**
	 * 投料计划
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/MFPS")
	public String feedingPlanSJD(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Production/feedingPlanSJD";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Production/feedingPlanSJD";
		}
		return "loginsx";
	}

	/* 报工管理部分 end */

	/* 仓库管理部分 start */
	/**
	 * 生产发料页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PICK")
	public String picking(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "WareHouse/picking";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "WareHouse/picking";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 外协发料页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/OTPICK")
	public String outPicking(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "WareHouse/outPicking";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "WareHouse/outPicking";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 其他发料页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/OPICK")
	public String otherPicking(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "WareHouse/otherPicking";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "WareHouse/otherPicking";
		}
		return "errorTip/loginsx";
	}
	
	/**
	 * 其他入库页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/OWAREH")
	public String otherWarehousing(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "WareHouse/otherWarehousing";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "WareHouse/otherWarehousing";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 委外接收页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/OS")
	public String outsourcing(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "WareHouse/outsourcing";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "WareHouse/outsourcing";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 委外接收审核页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/RA")
	public String receivingAudit(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "WareHouse/receivingAudit";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "WareHouse/receivingAudit";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 委外结存页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/OSS")
	public String outsourcingSettleStorage(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "WareHouse/outsourcingSettleStorage";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "WareHouse/outsourcingSettleStorage";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 工序入库审核页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PW")
	public String processWarehousing(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "WareHouse/processWarehousing";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "WareHouse/processWarehousing";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 生产入库页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PDW")
	public String productionWarehousing(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "WareHouse/productionWarehousing";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "WareHouse/productionWarehousing";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 采购到货页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/CGDH")
	public String purarrival(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "WareHouse/purarrival";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "WareHouse/purarrival";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 到货入库审核
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/DH")
	public String resgoods(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "WareHouse/resgoods";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "WareHouse/resgoods";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 工序入库再出库
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/INOROUTSTK")
	public String inOrOutStock(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "WareHouse/inOrOutStock";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "WareHouse/inOrOutStock";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 锁库操作
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/LOWA")
	public String lockWarehouse(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "WareHouse/lockWarehouse";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "WareHouse/lockWarehouse";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 工装夹具借出
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/WPLE")
	public String workPacklend(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "WareHouse/workPacklend";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "WareHouse/workPacklend";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 工装夹具归还
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/WPFX")
	public String workPackFix(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "WareHouse/workPackFix";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "WareHouse/workPackFix";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 到货关闭
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/DHGB")
	public String arrivalClosing(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "WareHouse/arrivalClosing";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "WareHouse/arrivalClosing";
		}
		return "errorTip/loginsx";
	}
	/* 仓库管理部分 end */

	/* 台账部分 start */
	/**
	 * 报工台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/BG_TZ")
	public String baogongTaizhang(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/baogongTaizhang";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/baogongTaizhang";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 转移台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/TL_TZ")
	public String transferLedger(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/transferLedger";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/transferLedger";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 工序入库台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PE_TZ")
	public String processEntryLedger(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/processEntryLedger";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/processEntryLedger";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 进料检验台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/FC_TZ")
	public String feedCheckLedger(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/feedCheckLedger";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/feedCheckLedger";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 采购到货台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/CGDH_TZ")
	public String purarrivalLedger(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/purarrivalLedger";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/purarrivalLedger";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 发料台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PL_TZ")
	public String pickingLedger(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/pickingLedger";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/pickingLedger";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 委外转出台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/O_TZ")
	public String outLedger(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/outLedger";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/outLedger";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 供应商门户页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/GYS_DD")
	public String supplier(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Supplier/supplier";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Supplier/supplier";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 接收台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/I_TZ")
	public String inLedger(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/inLedger";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/inLedger";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 委外转出/接收台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/IO_TZ")
	public String inOutLedger(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/inOutLedger";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/inOutLedger";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 委外接收审核台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/ORC_TZ")
	public String outReceptionCheckLedger(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/outReceptionCheckLedger";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/outReceptionCheckLedger";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 委外质检台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/ICL_TZ")
	public String inCheckingLedger(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/inCheckingLedger";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/inCheckingLedger";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 过程检验台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PCL_TZ")
	public String processCheckLedger(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/processCheckLedger";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/processCheckLedger";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 生产入库台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PEL_TZ")
	public String productionEntryLedger(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/productionEntryLedger";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/productionEntryLedger";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 采购到货台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PAL_TZ")
	public String purchaseArrivalLedger(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/purchaseArrivalLedger";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/purchaseArrivalLedger";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 派工台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PIES_TZ")
	public String piesLedger(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/piesLedger";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/piesLedger";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 质检台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/IL_TZ")
	public String inspectionLedger(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/inspectionLedger";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/inspectionLedger";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 生产改制台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PRRS_TZ")
	public String productRestructureTz(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/productRestructureTz";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/productRestructureTz";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 马达改制台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/MOMO_TZ")
	public String motorModifyTz(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/motorModifyTz";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/motorModifyTz";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 生产任务台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PP_TZ")
	public String productionPlanTz(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/productionPlanTz";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/productionPlanTz";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 其他发料台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/OP_TZ")
	public String otherPickingTz(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/otherPickingTz";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/otherPickingTz";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 采购入库台账页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PUR_TZ")
	public String purrivalRuTz(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/purrivalRuTz";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/purrivalRuTz";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 工装夹具借还信息页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/WP_FI")
	public String workLoanInformation(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "TaiZhang/workLoanInformation";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "TaiZhang/workLoanInformation";
		}
		return "errorTip/loginsx";
	}
	/* 台账部分 end */

	/* 汇总部分 start */
	/**
	 * 装配汇总页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/AS_HZ")
	public String assemblySummary(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "summary/assemblySummary";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "summary/assemblySummary";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 已派工未入库汇总页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/NFDS_HZ")
	public String notFinishDisPatchSummary(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "summary/notFinishDisPatchSummary";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "summary/notFinishDisPatchSummary";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 按工作中心汇总页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/BI")
	public String bi(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "summary/bi";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "summary/bi";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 按物料汇总页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/BI1")
	public String bi1(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "summary/bi1";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "summary/bi1";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 按任务单汇总页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/BI2")
	public String bi2(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "summary/bi2";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "summary/bi2";
		}
		return "errorTip/loginsx";
	}
	
	/**
	 * 报工及时率（按生产车间）汇总页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/BI3")
	public String bi3(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "summary/bi3";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "summary/bi3";
		}
		return "errorTip/loginsx";
	}
	
	/**
	 * 报工及时率（按物料）汇总页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/BI4")
	public String bi4(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "summary/bi4";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "summary/bi4";
		}
		return "errorTip/loginsx";
	}
	
	/**
	 * 报工及时率（按任务单）汇总页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/BI5")
	public String bi5(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "summary/bi5";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "summary/bi5";
		}
		return "errorTip/loginsx";
	}
	
	/**
	 * 质检及时率（按生产车间）汇总页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/BI6")
	public String bi6(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "summary/bi6";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "summary/bi6";
		}
		return "errorTip/loginsx";
	}
	
	/**
	 * 质检及时率（按物料）汇总页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/BI7")
	public String bi7(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "summary/bi7";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "summary/bi7";
		}
		return "errorTip/loginsx";
	}
	
	/**
	 * 质检及时率（按任务单）汇总页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/BI8")
	public String bi8(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "summary/bi8";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "summary/bi8";
		}
		return "errorTip/loginsx";
	}
	
	/**
	 * 入库及时率（按生产车间）汇总页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/BI9")
	public String bi9(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "summary/bi9";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "summary/bi9";
		}
		return "errorTip/loginsx";
	}
	
	/**
	 * 入库及时率（按物料）汇总页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/BI10")
	public String bi10(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "summary/bi10";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "summary/bi10";
		}
		return "errorTip/loginsx";
	}
	
	/**
	 * 入库及时率（按任务单）汇总页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/BI11")
	public String bi11(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "summary/bi11";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "summary/bi11";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 生产追溯页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PTY")
	public String productionTraceability(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "summary/productionTraceability";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "summary/productionTraceability";
		}
		return "errorTip/loginsx";
	}
	
	/**
	 * 绩效指标页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PERI")
	public String performanceIndicators(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "summary/performanceIndicators";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "summary/performanceIndicators";
		}
		return "errorTip/loginsx";
	}
	
	/**
	 * 明细列表页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/DLT")
	public String detailList(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "summary/detailList";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "summary/detailList";
		}
		return "errorTip/loginsx";
	}
	
	/**
	 * 汇总信息页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/SIN")
	public String summaryInformation(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "summary/summaryInformation";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "summary/summaryInformation";
		}
		return "errorTip/loginsx";
	}
	/* 汇总部分 end */
	/* 办公室部分 end */

	/* 报工台部分 start */
	/**
	 * 未发料汇总页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/NP_SU")
	public String notPickingSummary(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "summary/notPickingSummary";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "summary/notPickingSummary";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 登录页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/CJ")
	public String bgt(HttpSession session) {
		return "desk/index";
	}

	/**
	 * 首页
	 *
	 * @param session
	 * @return
	 */
	@RequestMapping(value = "/CJI")
	public String indexDesk(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user == null) {
			return "errorTip/loginsx";
		}
		return "desk/indexDesk";
	}

	/**
	 * 开工登记页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/SO_CJ")
	public String startOperationCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/menu/startOperationCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 报工页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/FO_CJ")
	public String finishOperationCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/menu/finishOperationCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 首检页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/FQC_CJ")
	public String firstQualityCheckingCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/menu/firstQualityCheckingCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 巡检页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/PQC_CJ")
	public String patrolQualityCheckingCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/menu/patrolQualityCheckingCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 抽检页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/TQC_CJ")
	public String takeQualityCheckingCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/menu/takeQualityCheckingCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 完工质检页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/FHQC_CJ")
	public String finishQualityCheckingCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/menu/finishQualityCheckingCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 外协质检页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/OQC_CJ")
	public String outsideQualityCheckingCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/menu/outsideQualityCheckingCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 质量检验页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/QC_CJ")
	public String qualityCheckingCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/menu/qualityCheckingCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 外协检验页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/OQC_CJ_OTHER")
	public String waixieCheckingCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/menu/finishOperaTZCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 首检页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/FC_CJ")
	public String FirstCheckingCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/menu/firstCheckingTZCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 巡检页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/PC_CJ")
	public String patrolCheckingCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/menu/patrolCheckingTZCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 接收页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/RI_CJ")
	public String receivingCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/menu/receivingCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 报工台账页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/BGTZ_CJ")
	public String baogongTZCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/menu/baogongTZCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 进料质检页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/JLQC_CJ")
	public String jlqualityCheckingCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/menu/jlqualityCheckingCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 生产入库页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/PW_CJ")
	public String productionWareHousingCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/menu/productionWareHousingCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 到货入库（审核）页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/DH_CJ")
	public String resGoodsCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/menu/resGoodsCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 委外接收（审核）页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/RA_CJ")
	public String receivingAuditCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/menu/receivingAuditCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 工序入库（审核）页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/PWG_CJ")
	public String processWarehousingCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/menu/processWarehousingCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 工序入库再出库（审核）页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/IORO_CJ")
	public String inOrOutStockCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/menu/inOrOutStockCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 图纸查看页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/DLK")
	@CrossOrigin
	public ModelAndView drawingLookCJ(HttpSession session, ModelAndView mav, String fNumber, String fOperSN,
			String fName) {
//		session.setAttribute("copy", CopyRight.copyRight);
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			mav = new ModelAndView("desk/menu/drawingLookCJ");
			mav.addObject("fNumber", fNumber);
			mav.addObject("fOperSN", fOperSN);
			mav.addObject("fName", fName);
		} else {
			mav = new ModelAndView("errorTip/loginsx");
		}
		return mav;
	}

	/* 报工台部分 end */
	/* 供应商部分 start */
	/**
	 * 首页
	 *
	 * @param session
	 * @return
	 */
	@RequestMapping(value = "/sup")
	public String supplyIndex(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user == null) {
			return "errorTip/loginsx";
		}
		return "desk/supplyIndex";
	}

	/**
	 * 我的订单页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/MYOD")
	public String myOrder(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/sup/myOrder";
		}
		return "errorTip/loginsx";
	}
	
	/**
	 * 订单结算清单页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/ORDERSL")
	public String orderSettlementList(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/sup/orderSettlementList";
		}
		return "/errorTip/loginsx";
	}
	
	/**
	 * 我的委外单页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/MYOO")
	public String myOutsourcingOrder(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/sup/myOutsourcingOrder";
		}
		return "/errorTip/loginsx";
	}
	
	/**
	 * 委外结算清单页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/OUTSL")
	public String outsourcingSettlementList(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/sup/outsourcingSettlementList";
		}
		return "/errorTip/loginsx";
	}

	/**
	 * 修改密码页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/MOPA")
	public String modifyPassword(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/sup/modifyPassword";
		}
		return "errorTip/loginsx";
	}

	/* 供应商部分 end */
	/* 客户部分 start */
	/**
	 * 首页
	 *
	 * @param session
	 * @return
	 */
	@RequestMapping(value = "/CUS")
	public String customerIndex(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user == null) {
			return "errorTip/loginsx";
		}
		return "desk/customerIndex";
	}

	/**
	 * 进度查询页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/CUOD")
	public String customerOrder(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/cus/customerOrder";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 修改密码页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/CMOPA")
	public String customermodifyPassword(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "desk/cus/customermodifyPassword";
		}
		return "errorTip/loginsx";
	}

	/* 客户部分 end */
	/**
	 * 消息
	 *
	 * @param session
	 */
	@RequestMapping(value = "/MESSAGE")
	public String message(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (user != null) {
			return "home/message";
		}
		return "errorTip/loginsx";
	}

	/* 撤销部分 start */
	/**
	 * 任务单撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/TR_CX")
	public String taskRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/taskRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/taskRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 派工单撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PR_CX")
	public String piesRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/piesRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/piesRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 委外单撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/OUT_CX")
	public String outRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/outRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/outRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 开工单撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/SR_CX")
	public String startRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/startRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/startRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 完工单撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/OV_CX")
	public String overRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/overRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/overRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 生产入库撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PWR_CX")
	public String productionWarehousRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/productionWarehousRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/productionWarehousRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 工序入库撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/POWR_CX")
	public String processWarehousRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/processWarehousRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/processWarehousRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 委外质检撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/OUTC_CX")
	public String outCheckRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/outCheckRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/outCheckRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 委外接收审核撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/OUTRECEIVER_CX")
	public String outReceiverRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/outReceiverRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/outReceiverRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 首检撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/FR_CX")
	public String firstRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/firstRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/firstRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 巡检撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/INS_CX")
	public String inspectionRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/inspectionRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/inspectionRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 外协发料撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/EC_CX")
	public String externalRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/externalRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/externalRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 完工检撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/OCV_CX")
	public String overCheckRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/overCheckRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/overCheckRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 生产发料（一般发料）撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/OP_CX")
	public String ordinaryProdRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/ordinaryProdRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/ordinaryProdRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 生产发料（合并发料）撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/MP_CX")
	public String mergeProdRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/mergeProdRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/mergeProdRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 生产改制撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PRRS_CX")
	public String productRestructureRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/productRestructureRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/productRestructureRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 马达改制撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/MOMO_CX")
	public String motorModifyRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/motorModifyRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/motorModifyRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 进料质检撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/FEC_CX")
	public String feedbackRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/feedbackRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/feedbackRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 采购入库撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PUR_CX")
	public String purrivalRuRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/purrivalRuRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/purrivalRuRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 采购到货撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/PURR_CX")
	public String purrivalRevoke(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/purrivalRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/purrivalRevoke";
		}
		return "errorTip/loginsx";
	}
	/* 撤销部分 end */

	/* 手持机部分 start */
	/**
	 * 登录页面
	 *
	 * @param session
	 */
	@RequestMapping(value = "/SCJ")
	public String SCJ(HttpSession session) {
		return "check/indexSCJ";
	}

	@RequestMapping(value = "/A")
	public String a(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "check/indexSCJ";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "check/indexSCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 首页页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/SY_SCJ")
	public String indexDeskSCJ(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "check/indexDeskSCJ";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "check/indexDeskSCJ";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 首检页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/FI_SCJ")
	public String firstInspection(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "check/menu/firstInspection";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "check/menu/firstInspection";
		}
		return "errorTip/loginsx";
	}
	/* 手持机部分 end */

	/**
	 * 工废审批页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/SCRAP_SP")
	public String checkScrapFqty(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "Approval/scrapApproval";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "Approval/scrapApproval";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 工废审批撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/SCRAP_CX")
	public String checkScrapFqtyCx(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/scrapRevoke";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/scrapRevoke";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 实时库存页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/GT_IN")
	public String getWare(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/getWare";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/getWare";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 库位查看页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/LC_LO")
	public String locationLook(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/locationLook";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/locationLook";
		}
		return "errorTip/loginsx";
	}

	/*
	 * 实时库存汇总页面
	 *
	 * @param session
	 *
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/IN_SU")
	public String infactSummary(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/infactSummary";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/infactSummary";
		}
		return "errorTip/loginsx";
	}

	/**
	 * 采购到货撤销页面
	 *
	 * @param session
	 * @return 跳转到登录过期页面
	 */
	@RequestMapping(value = "/CGDH_CX")
	public String purrivalCx(HttpSession session) {
		User user = (User) SecurityUtils.getSubject().getPrincipal();
		if (dataBaseService.whetherCloseAccount()) {
			// 如果为关账期则判断是否为admin登录
			if (user != null) {
				// 如果帐户为admin则正常放行
				if ("admin".equals(user.getAccount())) {
					return "revoke/purrivalCx";
				} else {
					// 否则跳转到关账页面
					return "gzPage";
				}
			}
			return "gzPage";
		}
		if (user != null) {
			return "revoke/purrivalCx";
		}
		return "errorTip/loginsx";
	}
}
